Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(docs): deprecation notices for methods and properties #15394

Closed

Conversation

petebacondarwin
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

Please check if the PR fulfills these requirements

Other information:

Closes #15351

@petebacondarwin
Copy link
Contributor Author

I'm aware that Travis is not happy. I will fix this later today and maybe even break the changes into smaller commits for easier reviewing :-)

@petebacondarwin petebacondarwin force-pushed the deprecated-notices branch 2 times, most recently from 5f5acc4 to 08fce2d Compare November 16, 2016 16:37
@petebacondarwin
Copy link
Contributor Author

OK, smaller commits. Travis is happy.
What more could you want of a PR?

@@ -5,6 +5,8 @@ angular.module('ngCookies').
* @ngdoc service
* @name $cookieStore
* @deprecated
* Please use the {@link ngCookies.$cookies `$cookies`} service instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hasn't this been deprecated for some time now? Perhaps we should schedule a removal timeline?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be also nice to mention the version in which this was deprecated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but not in this PR :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. :)

@@ -662,6 +662,12 @@ ul.events > li {
max-width: 100%;
}

.deprecated-title {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this technically be part of the deprecation commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, although I am not sure I have the energy for further rebasing :-/

@Narretz
Copy link
Contributor

Narretz commented Nov 17, 2016

Good stuff. Having the templates in the repo allows us to move faste with changes, too.
A few notes:

  • I think using "warning" is a bit too weak for deprecation. It should be danger.
  • The API deprecation template is different. We should ideally use the same as for props and methods (can do in a follow-up)
  • In a follow-up, we should also make the deprecation notices in @description blocks consistent. Most noticable in the compile docs
  • Can we have "sub-annoations/tags" for @deprecated? then we could insert @since_version, @remove_version, and @description, and make this consistent across the board

@mgol
Copy link
Member

mgol commented Nov 17, 2016

Can we have "sub-annoations" for @deprecated? then we could insert @since_version, @remove_version, and @description, and make this consistent across the board

That would be wonderful.


{% code %}
<script src="angular.js">
<script src="{$ doc.packageFile $}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing <script> tags.

<a href="http://bower.io">Bower</a> e.g.
{% code %}bower install {$ doc.packageName $}#X.Y.Z{% endcode %}
<a href="http://bower.io">Bower</a><br>
e.g. {% code %}bower install {$ doc.packageName $}@X.Y.Z{% endcode %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be # instead of @?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what is in dgeni-packages - so it looks like a breakage - but then it is re-fixed in a subsequent commit.

@@ -69,7 +61,6 @@ <h2 id="known-issues">Known Issues</h2>
{% endif %}


{% if doc.componentGroups.length %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what is in dgeni-packages - so it looks like a breakage - but then it is re-fixed in a subsequent commit.

@petebacondarwin
Copy link
Contributor Author

Can we have "sub-annoations" for @deprecated? then we could insert @since_version, @remove_version, and @description, and make this consistent across the board

The content of an annotation is completely configurable. But it can't really use sub-annotations, because the parser would see them as no top level annotations.
But you can do something like:

@deprecated since-version="..." remove-version="..." what is left is description

Then we would just parse for the attributes at the start of the description and pull them out.

Is that what you want?

@petebacondarwin
Copy link
Contributor Author

Fixed up.

@Narretz
Copy link
Contributor

Narretz commented Nov 18, 2016

@petebacondarwin Yes, this custom annoation content like you describe is what I'd like. I think @param does something like that? It has some custom transforms in the tag-defs. I was lead a bit in a wrong direction by looking a @method which seems to have "real" sub-annoations, but then again that's jsdoc, which is different.

@petebacondarwin
Copy link
Contributor Author

OK, so I have updated the @deprecation tag to take sinceVersion and removeVersion options.

I also moved the docs.css file changes to the correct commit :-)

@Narretz PTAL

@mgol
Copy link
Member

mgol commented Nov 18, 2016

There are some linting violations but it's most likely due to us not checking docs properly. We can fix it later.

The new @deprecated syntax is not yet used, is it, @petebacondarwin?

@mgol
Copy link
Member

mgol commented Nov 18, 2016

The deprecation notice has disappeared from the ngComponentRouter page.

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
ellimist pushed a commit to ellimist/angular.js that referenced this pull request Mar 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@deprecated tags are not reflected in event/methods/properties descriptions
5 participants